//=============================================================================
 //L85 Fire
//=============================================================================
class BullpupWFire extends SRKFFire;

var float ClickTime;
var vector  KickMomentum;
var bool bZoomed;

// Calculate modifications to spread
simulated function float GetSpread()
{
	local float NewSpread;
	local float AccuracyMod;

	AccuracyMod = 1.0;

	// Spread bonus for firing aiming
	if( KFWeap.bAimingRifle )
	{
		AccuracyMod *= 0.5;
	}

	// Small spread bonus for firing crouched
	if( Instigator != none && Instigator.bIsCrouched )
	{
		AccuracyMod *= 0.85;
	}

	// Small spread bonus for firing in semi auto mode
	if( bWaitForRelease )
	{
		AccuracyMod *= 0.85;
	}


	NumShotsInBurst += 1;

	if ( Level.TimeSeconds - LastFireTime > 0.5 )
	{
		NewSpread = Default.Spread;
		NumShotsInBurst=0;
	}
	else
	{
		// Decrease accuracy up to MaxSpread by the number of recent shots up to a max of six
		NewSpread = FMin(Default.Spread + (NumShotsInBurst * (MaxSpread/6.0)),MaxSpread);
	}

	NewSpread *= AccuracyMod;

	return NewSpread;
}

defaultproperties
{
     FireAimedAnim="Fire_Iron"
     RecoilRate=0.070000
     maxVerticalRecoilAngle=150
     maxHorizontalRecoilAngle=55
     ShellEjectClass=Class'ROEffects.KFShellEjectBullpup'
     ShellEjectBoneName="Bullpup"
     StereoFireSound=SoundGroup'KF_BullpupSnd.Bullpup_FireST'
     DamageType=Class'PerksSimHostOrg.DamTypeBullpupW'
     DamageMin=16
     DamageMax=26
     Momentum=8500.000000
     bPawnRapidFireAnim=True
     TransientSoundVolume=1.800000
     FireLoopAnim="Fire"
     TweenTime=0.025000
     FireSound=SoundGroup'KF_BullpupSnd.Bullpup_Fire'
     NoAmmoSound=Sound'KF_9MMSnd.9mm_DryFire'
     FireForce="AssaultRifleFire"
     FireRate=0.100000
     AmmoClass=Class'PerksSimHostOrg.BullpupWAmmo'
     AmmoPerFire=1
     ShakeRotMag=(X=75.000000,Y=75.000000,Z=250.000000)
     ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
     ShakeRotTime=0.500000
     ShakeOffsetMag=(X=6.000000,Y=3.000000,Z=10.000000)
     ShakeOffsetRate=(X=1000.000000,Y=1000.000000,Z=1000.000000)
     ShakeOffsetTime=1.000000
     BotRefireRate=0.990000
     FlashEmitterClass=Class'ROEffects.MuzzleFlash1stSTG'
     aimerror=42.000000
     Spread=0.008500
     SpreadStyle=SS_Random
}
